package com.nhii.base.common.LayoutManagement;

import android.content.Context;

import androidx.annotation.DrawableRes;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.RecyclerView;

import com.nhii.base.common.R;

/**
 * author : Alex
 * e-mail : xys9786@outlook.com
 * date   : 2020/5/1517:16
 * desc   :  RecyclerView分割线 管理类
 * version: 1.0
 */
public class RecyclerViewDividerManagement {

    /**
     * 获取分割线
     * @return
     */
    public static RecyclerView.ItemDecoration getRecyclerViewDivider(Context context) {
        DividerItemDecoration itemDecoration = new DividerItemDecoration(context, DividerItemDecoration.VERTICAL);
        itemDecoration.setDrawable(context.getResources().getDrawable(R.drawable.public_recyclerview_divider));
        return itemDecoration;
    }
}
